package Driver;

import java.awt.EventQueue;
import java.sql.DriverManager;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.logging.Level;
import java.util.logging.Logger;

import javax.swing.UIManager;

import com.mysql.jdbc.Connection;
import com.mysql.jdbc.Statement;

import Controller.DBportal;
import Models.Recipe;
import Views.MainWindow;


public class MainDriver {

	/**
	 * @param args
	 */    
	
	/*
	public static void main(String[] args) {
		DBportal portal = new DBportal();  //create a connection to the db
		//portal.getAllRecipeTableEntry();
		Recipe testR = portal.getRecipe(6);
		System.out.println(testR.toString());
		portal.closeConnections();  //clean up
		 	
	}*/
	public static void main(String[] args) {

		
		EventQueue.invokeLater(new Runnable() {
			public void run() {
				try {
										//set to sea glass look and feel
					UIManager.setLookAndFeel("com.seaglasslookandfeel.SeaGlassLookAndFeel");
					DBportal portal = new DBportal();
					MainWindow frame = new MainWindow(portal);
					//frame.setResizable(false);
					frame.setVisible(true);

				} catch (Exception e) {
					e.printStackTrace();
				}
			}
		});
	}

}
